<!DOCTYPE html>
<html>
<head>
  <style>
    .covers {
      /*data URI of full green 97x43 PNG*/
      background: red url("") no-repeat 0 0 / cover;
      border: 5px solid gray;
      margin: 10px;
    }
    .contains {
      /*data URI of full green 97x43 PNG*/
      background: white url("") no-repeat 0 0 / contain;
      border: 5px solid gray;
      margin: 10px;
    }
  </style>
</head>
<body>
<div class="covers" style="width: 120px; height: 50px;"></div>
<div class="covers" style="width: 50px; height: 120px;"></div>
<div class="contains" style="width: 150px; height: 49px;"></div>
<div class="contains" style="width: 50px; height: 50px;"></div>
</body>